package com.smileymedia.smil.content;

import java.util.Map;

import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Typeface;

/**
 * Text Content
 * @author gbugaj
 *
 */
public class TextContent extends SmilContent{

	private SmilRegion mRegion;

	private  Paint paint;

	private static final String	PARAM_FONT_KEY = "fontSize";
	private static final String	PARAM_COLOR_KEY = "fontColor";
;	
	public TextContent(){
		
		//Default paint 
		paint = new Paint();
		paint.setColor(Color.YELLOW);
		paint.setTextSize(14);
		paint.setTypeface(Typeface.MONOSPACE);
	}

	public Map<String, String> getParameters() {
		return null;
	}

	public SmilRegion getRegion() {
		return mRegion;
	}
	
	

	@Override
	public String toXML() {
		return null;
	}

	@Override
	public void render(Canvas canvas) {
		if(mParameters.containsKey(PARAM_FONT_KEY)){
			paint.setTextSize(Float.parseFloat(mParameters.get(PARAM_FONT_KEY)));
		}
		
		canvas.drawText(getSource(), 80, 80, paint);
	}
}
